﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AresWebService.Ares
{
	/// <summary>
	/// Info about the subject
	/// </summary>
	public class SubjectInfo
	{
		/*
		* @subject_ICO NVARCHAR(20),			-- ico for testing
		* @subject_NotFound BIT = 0,			-- set to 1 if the subject was not found!
		* @subject_DV DATETIME = NULL,			-- datum vzniku
		* @subject_DZ DATETIME = NULL,			-- datum zaniku
		* @subject_OF NVARCHAR(96) = NULL,		-- Obchodni nazev
		* @subject_PF_KOD INT = NULL,			-- pravni forma...kod
		* @subject_PF_NAZEV NVARCHAR(100) = NULL,		-- pravni forma...nazev
		* @subject_AA_NU NVARCHAR(64) = NULL,		-- adresa: nazev ulice
		* @subject_AA_CD NVARCHAR(10) = NULL,		-- adresa: Cislo popis
		* @subject_AA_CO NVARCHAR(10) = NULL,		-- adresa: cislo orient.
		* @subject_AA_N NVARCHAR(50) = NULL,		-- adresa: nazev obec asi...
		* @subject_AA_NMC NVARCHAR(50) = NULL,		-- adresa: nazev mistni casti
		* @subject_AA_KS NVARCHAR(255) = NULL,		-- adresa: kod statu
		* @subject_AA_NS NVARCHAR(50) = NULL,		-- adresa: nazev statu
		* @subject_AA_PSC NVARCHAR(20) = NULL,		-- adresa: PSC
		* @subject_IsVatRegistered BIT = NULL,		-- isVATRegistered...
		* @subject_IsProblematicSubject BIT = NULL,	-- isProblemnaticSubject...
		* @subject_TradeRegister NVARCHAR(200) = NULL,	-- registrace u soudu/sro atp.
		* @subject_KPP NVARCHAR(50) = NULL,		-- kategorie poctu pracovniku
		* @subject_DIC NVARCHAR(20) = NULL		-- DIC
		* 
		*/
		/// <summary>
		/// DIC
		/// </summary>
		public string Dic
		{
			get
			{
				return this.dic;
			}
			set
			{
				this.dic = value;
			}
		}

		private string dic;

		/// <summary>
		/// kategorie poctu pracovniku
		/// </summary>
		public string AresAlias_KPP
		{
			get
			{
				return this.kpp;
			}
			set
			{
				this.kpp = value;
			}
		}

		private string kpp;

		/// <summary>
		/// trade register
		/// </summary>
		public string TradeRegister
		{
			get
			{
				return this.tradeRegister;
			}
			set
			{
				this.tradeRegister = value;
			}
		}

		private string tradeRegister;

		/// <summary>
		/// insolvence/upadek...
		/// </summary>
		public bool IsProblematicSubject
		{
			get
			{
				return this.isProblematicSubject;
			}
			set
			{
				this.isProblematicSubject = value;
			}
		}

		private bool isProblematicSubject;

		/// <summary>
		/// is VAT registered?
		/// </summary>
		public bool IsVatRegistered
		{
			get
			{
				return this.isVatRegistered;
			}
			set
			{
				this.isVatRegistered = value;
			}
		}

		private bool isVatRegistered;

		/// <summary>
		/// address of the subject
		/// </summary>
		public SubjectAddress Address
		{
			get
			{
				return this.address;
			}
			set
			{
				this.address = value;
			}
		}

		SubjectAddress address;

		/// <summary>
		/// pravni forma
		/// </summary>
		public SubjectLegalForm AresAlias_PF
		{
			get
			{
				return this.LegalForm;
			}
		}
		/// <summary>
		/// legal form
		/// </summary>
		public SubjectLegalForm LegalForm { get; set; }

		/// <summary>
		/// Obchodni nazev
		/// </summary>
		public string AresAlias_OF
		{
			get
			{
				return this.CompanyName;
			}
		}
		/// <summary>
		/// company name
		/// </summary>
		public string CompanyName{get;set;}

		/// <summary>
		/// datum zaniku subjektu. U RZP take datum preruseni cinnosti.
		/// </summary>
		public DateTime ? AresAlias_DZ
		{
			get
			{
				return this.DateTerminated;
			}
		}
		/// <summary>
		///  when the subject was created
		/// </summary>
		public DateTime ? DateCreated{get;set;}

		/// <summary>
		/// Datum Vzniku
		/// </summary>
		public DateTime? AresAlias_DV
		{
			get
			{
				return this.DateCreated;
			}
		}
		/// <summary>
		/// when the subject was terminated
		/// </summary>
		public DateTime? DateTerminated { get; set; }

		/// <summary>
		/// ICO
		/// </summary>
		public string Ico
		{
			get
			{
				return this.ico;
			}
			set
			{
				this.ico = value;
			}
		}

		private string ico;
	}
}